<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>萃萃后台管理系统</title>
    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
</head>
<body>
<div class="container">
    <div class="page-header text-center">
        <h1>
            萃萃后台管理系统
            <small>编辑作者</small>
        </h1>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form action="{% url 'book:author_edit' %}" method="post" style="border: #999 1px solid; padding: 20px;">
                {% csrf_token %}
                <input type="hidden" name="id" value="{{ author.id }}">
                <div class="form-group">
                    <label for="name">作者</label>
                    <input type="text" class="form-control" id="name" name="name" value="{{ author.name }}">
                </div>
                <div class="form-group">
                    <label for="gender">gender</label>
                    <select type="text" class="form-control" id="gender" name="gender">
                        {% ifequal author.gender '男' %}
                            <option value="男" selected>男</option>
                            <option value="女">女</option>
                        {% else %}
                            <option value="男">男</option>
                            <option value="女" selected>女</option>
                        {% endifequal %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="birthday">生日</label>
                    <input type="text" class="form-control" id="birthday" name="birthday" value="{{ author.birthday }}">
                </div>
                <div class="form-group">
                    <label for="phone">手机</label>
                    <input type="text" class="form-control" id="phone" name="phone" value="{{ author.phone }}">
                </div>
                <div class="form-group">
                    <label for="wechat">微信</label>
                    <input type="text" class="form-control" id="wechat" name="wechat" value="{{ author.wechat }}">
                </div>
                <div class="form-group">
                    <label for="qq">QQ</label>
                    <input type="text" class="form-control" id="qq" name="qq" value="{{ author.qq }}">
                </div>
                <div class="form-group">
                    <label for="email">邮箱</label>
                    <input type="email" class="form-control" id="email" name="email" value="{{ author.email }}">
                </div>
                <button type="submit" class="btn btn-default">提交</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>